package cos.android.tim.element;

import cos.android.tim.objects.Chain;
import cos.android.tim.utils.Point;

public class Ropeable {

	Chain chain;
	Point extremePoint;

	public Ropeable(Point extremePoint) {
		super();
		chain = null;
		this.extremePoint = extremePoint;
	}

	public Point getExtremePoint(Point origin) {
		return new Point(extremePoint.getxPos() + origin.getxPos(),
				extremePoint.getyPos() + origin.getyPos());
	}

	public Chain getChain() {
		return chain;
	}

	public void setChain(Chain chain) {
		this.chain = chain;
	}

	public boolean isLinked() {
		return (chain != null);
	}

}
